package cn.cheln.support.ui.adapter;

import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.view.View.OnTouchListener;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import cn.cheln.support.log.Logs;
import java.util.HashMap;
import java.util.Map;

public class ListenerBox
  implements View.OnClickListener, View.OnTouchListener, View.OnLongClickListener, CompoundButton.OnCheckedChangeListener
{
  public MapAdapter basicAdapter;
  public Map<Integer, MapAdapter.ActionListener> handlers = new HashMap();
  private boolean onCheckedChange_BooleanArg;
  private MotionEvent onTouch_MotionEvent;

  public ListenerBox(MapAdapter paramMapAdapter, MapAdapter.ActionListener paramActionListener)
  {
    this.basicAdapter = paramMapAdapter;
    this.handlers.put(Integer.valueOf(paramActionListener.getListenerType()), paramActionListener);
  }

  public void addActionListener(MapAdapter.ActionListener paramActionListener)
  {
    this.handlers.put(Integer.valueOf(paramActionListener.getListenerType()), paramActionListener);
  }

  public MapAdapter getBaseAdapter()
  {
    return this.basicAdapter;
  }

  public MotionEvent getOnTouch_MotionEvent()
  {
    return this.onTouch_MotionEvent;
  }

  public boolean isOnCheckedChange_BooleanArg()
  {
    return this.onCheckedChange_BooleanArg;
  }

  public void onCheckedChanged(CompoundButton paramCompoundButton, boolean paramBoolean)
  {
    if (!(this.handlers.containsKey(Integer.valueOf(3))))
      return;
    this.onCheckedChange_BooleanArg = paramBoolean;
    ((MapAdapter.ActionListener)this.handlers.get(Integer.valueOf(3))).handle(paramCompoundButton, this);
  }

  public void onClick(View paramView)
  {
    if (!(this.handlers.containsKey(Integer.valueOf(0))))
      return;
    ((MapAdapter.ActionListener)this.handlers.get(Integer.valueOf(0))).handle(paramView, this);
  }

  public boolean onLongClick(View paramView)
  {
    if (this.handlers.containsKey(Integer.valueOf(1)))
      ((MapAdapter.ActionListener)this.handlers.get(Integer.valueOf(1))).handle(paramView, this);
    return false;
  }

  public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
  {
    Logs.i("", "onTouch --------------- ");
    if (this.handlers.containsKey(Integer.valueOf(2)))
    {
      this.onTouch_MotionEvent = paramMotionEvent;
      ((MapAdapter.ActionListener)this.handlers.get(Integer.valueOf(2))).handle(paramView, this);
    }
    return false;
  }
}

/* Location:           H:\360云盘\lewa_explorer_3.0\bin\FileApp_orig_dex2jar.jar
 * Qualified Name:     cn.cheln.support.ui.adapter.ListenerBox
 * JD-Core Version:    0.5.2
 */